home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / utils / bibextract / citetags.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1992-10-29  |  3KB  |  61 lines

  1. #!/bin/sh
  2. ### ====================================================================
  3. ###  @UNIX-shell-file{
  4. ###     author          = "Nelson H. F. Beebe",
  5. ###     version         = "1.02",
  6. ###     date            = "30 October 1992",
  7. ###     time            = "19:41:46 MST",
  8. ###     filename        = "citetags.sh",
  9. ###     address         = "Center for Scientific Computing
  10. ###                        Department of Mathematics
  11. ###                        University of Utah
  12. ###                        Salt Lake City, UT 84112
  13. ###                        USA",
  14. ###     telephone       = "+1 801 581 5254",
  15. ###     FAX             = "+1 801 581 4148",
  16. ###     checksum        = "04454 60 290 2796",
  17. ###     email           = "beebe@math.utah.edu (Internet)",
  18. ###     codetable       = "ISO/ASCII",
  19. ###     keywords        = "BibTeX, bibliography",
  20. ###     supported       = "yes",
  21. ###     docstring       = "*********************************************
  22. ###                        This code is hereby placed in the PUBLIC
  23. ###                        DOMAIN and may be redistributed without any
  24. ###                        restrictions.
  25. ###                        *********************************************
  26. ###
  27. ###                        Read a LaTeX file, or an .aux file, and
  28. ###                        extract the citation tags, outputting them
  29. ###                        one per line on stdout, in sorted order.
  30. ###
  31. ###                        The companion program, citefind, can be
  32. ###                        used to extract the complete BibTeX entries
  33. ###                        for those tags from a bibliography file.
  34. ###                        This is useful when a small bibtex file
  35. ###                        must be prepared from large citation
  36. ###                        databases.
  37. ###
  38. ###                        Usage:
  39. ###                             citetags latex-file--or--aux-file >newbibfile
  40. ###
  41. ###                        The checksum field above contains a CRC-16
  42. ###                        checksum as the first value, followed by the
  43. ###                        equivalent of the standard UNIX wc (word
  44. ###                        count) utility output of lines, words, and
  45. ###                        characters.  This is produced by Robert
  46. ###                        Solovay's checksum utility.",
  47. ###  }
  48. ### ====================================================================
  49.  
  50. ### Edit history (reverse chronological order):
  51. ### [21-Oct-1992]       1.01    Update for public distribution
  52. ### [21-Apr-1990]       1.00    Original version
  53.  
  54. LIBDIR=@LIBDIR@
  55.  
  56. # The sort step is optional; citetags will not output duplicate tags,
  57. # but they will be in random order.
  58.  
  59. nawk -f ${LIBDIR}/citetags.awk $* | sort
  60. ### ====================================================================
  61.